package com.bree.erp.entity;

import java.io.Serializable;

import javax.persistence.Embeddable;

@Deprecated
@Embeddable
public class UnitOfMaterial implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private String code;
	private String abbreviation;
	private String description;
	
	@Override
	public int hashCode() {
		return code == null ? 0 : code.hashCode();
	}
	
	@Override 
	public boolean equals(Object obj) {
		
		if(code != null && obj instanceof UnitOfMaterial) {
			
			UnitOfMaterial that = (UnitOfMaterial) obj;
			
			return code.equals(that.getCode());
		}
		
		return false;
	}
	
	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}
	/**
	 * @param code the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}
	/**
	 * @return the abbreviation
	 */
	public String getAbbreviation() {
		return abbreviation;
	}
	/**
	 * @param abbreviation the abbreviation to set
	 */
	public void setAbbreviation(String abbreviation) {
		this.abbreviation = abbreviation;
	}
	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}
	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}
}
